package com.opennews.openplatform.familyexpenseapi.config

import org.springframework.boot.context.properties.ConfigurationProperties

@ConfigurationProperties(prefix = "app")
data class AppConfigProperties(
    val appConfig: AppConfig,
    val system: SystemConfig,
    val resource: ResourceConfig,
    val jwt: JwtConfig,
    val baiduMap: BaiduMapConfig,
    val amap: AmapConfig,
) {
    data class AppConfig(
        val recentSearchListMaxCount: Int,
    )

    data class SystemConfig(
        val timeZone: String,
    )

    data class ResourceConfig(
        val staticResourcesUrl: String,
        val bankLogoUrl: String,
        val regionFlagUrl: String,
        val apkDirectoryName: String,
        val avatarDirectoryName: String,
        val h5DirectoryName: String,
        val defaultAvatarUrl: String,
        val httpBaseUrl: String,
        val upload: UploadConfig,
    ) {
        data class UploadConfig(
            val rootFilePath: String,
        )
    }

    data class JwtConfig(
        val signingKey: String,
        val expiration: Int,
    )

    data class BaiduMapConfig(
        val androidKey: String,
    )

    data class AmapConfig(
        val restApiUrl: String,
        val androidKey: String,
        val webApiKey: String,
    )
}
